package com.itheima.d11_extends_features;

/**
 * 目标：了解继承的特性
 * 特性1：单继承，多层级继承
 * 特性2：所有的类都有一个祖宗类Object
 */
public class Test {

    public static void main(String[] args) {
        Son2 s = new Son2("爱坤", 30, "男", "中国");

        System.out.println(s.getName() + "," + s.getAge() + "," + s.getSex() + "," + s.getCountry());

        System.out.println(s); //默认调用继承自祖宗类Object的toString()方法
        System.out.println(s.toString());

    }
}
